package com.ysy.logistics.entities.device;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ysy.common.entities.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author 姚斯羽
 * @date 2025/4/16 14:11
 * @description: 设备实体类
 */
@Data
@TableName("device")
@Schema(name = "device", description = "设备实体类")
@Accessors(chain = true)
public class Device extends BaseEntity {

    @Schema(description = "设备Id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "设备编号")
    @TableField(value = "device_num")
    @NotNull(message = "设备编号不能为空")
    private String deviceNum;

    @Schema(description = "设备名称")
    @TableField(value = "device_name")
    @NotNull(message = "设备名称不能为空")
    private String deviceName;


    @Schema(description = "设备描述")
    @TableField(value = "remark")
    private String remark;

    @Schema(description = "设备类型")
    @TableField(value = "device_type")
    private Integer  deviceType;

    @Schema(description = "所属仓库")
    @TableField(value = "warehouse_id")
    private String warehouseId;

    @Schema(description = "上限阈值")
    @TableField(value = "upper_threshold")
    private Integer upperThreshold;

    @Schema(description = "下限阈值")
    @TableField(value = "lower_threshold")
    private Integer lowerThreshold;

}
